<?php /* Smarty version 2.6.14, created on 2012-11-01 18:13:38
         compiled from imobile_user_messages.tpl */
?><?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'truncate', 'imobile_user_messages.tpl', 41, false),array('modifier', 'choptext', 'imobile_user_messages.tpl', 41, false),)), $this);
?><?php
SELanguage::_preload_multi(11340038,11340032,780,785,786);
SELanguage::load();
?><?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'imobile_header.tpl', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

<div id="topbar">
	<div id="leftnav"> 
		<a href="user_home.php"><img alt="home" src="./include/imobile/iwebkit/images/home.png" /></a>
	</div> 
	<div id="title"> 
		<?php echo SELanguage::_get(11340038); ?>
	</div> 
	<div id="rightbutton"><a href="user_messages_new.php"><?php echo SELanguage::_get(11340032); ?></a></div>
</div>

<div id="contentlist">
	<?php ob_start(); 
 if ($this->_tpl_vars['user_unread_pms'] > 0): ?>(<?php echo $this->_tpl_vars['user_unread_pms']; ?>
)</b><?php else: 
 endif; 
 $this->_smarty_vars['capture']['default'] = ob_get_contents();  $this->assign('unread_messages', ob_get_contents());ob_end_clean(); ?>
	<div class="title"><?php echo SELanguage::_get(780); ?> <?php echo $this->_tpl_vars['unread_messages']; ?>
</div>

<?php if ($this->_tpl_vars['total_pms'] == 0): ?>
  <div class="boxerror"> 
  	<?php echo SELanguage::_get(785); ?>
  </div>

<?php else: ?>	  
	  
  <ul class="messages">
    <?php unset($this->_sections['pm_loop']);
$this->_sections['pm_loop']['name'] = 'pm_loop';
$this->_sections['pm_loop']['loop'] = is_array($_loop=$this->_tpl_vars['pms']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['pm_loop']['show'] = true;
$this->_sections['pm_loop']['max'] = $this->_sections['pm_loop']['loop'];
$this->_sections['pm_loop']['step'] = 1;
$this->_sections['pm_loop']['start'] = $this->_sections['pm_loop']['step'] > 0 ? 0 : $this->_sections['pm_loop']['loop']-1;
if ($this->_sections['pm_loop']['show']) {
    $this->_sections['pm_loop']['total'] = $this->_sections['pm_loop']['loop'];
    if ($this->_sections['pm_loop']['total'] == 0)
        $this->_sections['pm_loop']['show'] = false;
} else
    $this->_sections['pm_loop']['total'] = 0;
if ($this->_sections['pm_loop']['show']):

            for ($this->_sections['pm_loop']['index'] = $this->_sections['pm_loop']['start'], $this->_sections['pm_loop']['iteration'] = 1;
                 $this->_sections['pm_loop']['iteration'] <= $this->_sections['pm_loop']['total'];
                 $this->_sections['pm_loop']['index'] += $this->_sections['pm_loop']['step'], $this->_sections['pm_loop']['iteration']++):
$this->_sections['pm_loop']['rownum'] = $this->_sections['pm_loop']['iteration'];
$this->_sections['pm_loop']['index_prev'] = $this->_sections['pm_loop']['index'] - $this->_sections['pm_loop']['step'];
$this->_sections['pm_loop']['index_next'] = $this->_sections['pm_loop']['index'] + $this->_sections['pm_loop']['step'];
$this->_sections['pm_loop']['first']      = ($this->_sections['pm_loop']['iteration'] == 1);
$this->_sections['pm_loop']['last']       = ($this->_sections['pm_loop']['iteration'] == $this->_sections['pm_loop']['total']);
?>

        <?php if ($this->_tpl_vars['pms'][$this->_sections['pm_loop']['index']]['pm_read'] === FALSE): ?>
      <?php $this->assign('row_class', 'messages_unread'); ?>
    <?php else: ?>
      <?php $this->assign('row_class', 'messages_read'); ?>
    <?php endif; ?>
	<li class="message <?php echo $this->_tpl_vars['row_class']; ?>
">
		<a href='user_messages_view.php?pmconvo_id=<?php echo $this->_tpl_vars['pms'][$this->_sections['pm_loop']['index']]['pmconvo_id']; ?>
#bottom'>
	    	<img src='<?php echo $this->_tpl_vars['pms'][$this->_sections['pm_loop']['index']]['pm_user']->user_photo('./images/nophoto.gif','TRUE'); ?>
' border='0' class='icon' alt="<?php echo sprintf(SELanguage::_get(786), $this->_tpl_vars['pms'][$this->_sections['pm_loop']['index']]['pm_user']->user_displayname_short); ?>">
            <span class="name"><?php echo $this->_tpl_vars['pms'][$this->_sections['pm_loop']['index']]['pm_user']->user_displayname; ?>
</span>
            <span class="subject"><?php echo $this->_tpl_vars['pms'][$this->_sections['pm_loop']['index']]['pmconvo_subject']; ?>
</span>
            <span class="comment"><?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['pms'][$this->_sections['pm_loop']['index']]['pm_body'])) ? $this->_run_mod_handler('truncate', true, $_tmp, 90) : smarty_modifier_truncate($_tmp, 90)))) ? $this->_run_mod_handler('choptext', true, $_tmp, 45, "<br>") : smarty_modifier_choptext($_tmp, 45, "<br>")); ?>
</span>
            <span class="date"><?php echo $this->_tpl_vars['datetime']->cdate(($this->_tpl_vars['setting']['setting_timeformat'])." ".($this->_tpl_vars['setting']['setting_dateformat']),$this->_tpl_vars['datetime']->timezone($this->_tpl_vars['pms'][$this->_sections['pm_loop']['index']]['pm_date'],$this->_tpl_vars['global_timezone'])); ?>
</span>
		</a>
	</li>
  <?php endfor; endif; ?>

  </ul>
 
  
<?php endif; ?>


  
</div>

<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'imobile_footer.tpl', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
